<template>
	<view class="abnormal-merchant-layout">
		<view class="abnormal-agent-item" v-for="item in dataList" :key="item.statementId" @tap="showDetailtList(item)">
			<text>{{item.labelName}}</text>
			<view class="abnormal-agent-item-right">
				<text>{{item.abnormalTotal}}人</text>
				<xh-icon icon="icon_jiantou"></xh-icon>
			</view>
			<view class="line"></view>
		</view>
		<xh-empty :show="dataList.length == 0"></xh-empty>
	</view>
</template>

<script setup>
	import { onLoad } from '@dcloudio/uni-app'
	import { ref } from 'vue'
	import { getMerSilenceList } from '@/common/api/api.js'
	
	const dataList = ref([])
	// 异常商户商明细列表
	const showDetailtList = (item)=>{
		const data = encodeURIComponent(JSON.stringify(item))
		uni.navigateTo({
			url:`/pages/home/merchant-manager/abnormal-merchant/abnormal-merchant-list/abnormal-merchant-list?data=${data}`
		})
	}
	const queryList = async ()=>{
		const res = await getMerSilenceList()
		dataList.value = res.result
	}
	onLoad(()=>{
		queryList()
	})
</script>

<style lang="scss" scoped>
.abnormal-merchant-layout{
	.abnormal-agent-item{
		background-color: #fff;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 30rpx;
		position: relative;
		.abnormal-agent-item-right{
			display: flex;
			align-items: center;
			font-size: 26rpx;
		}
	}
}
</style>
